import { isDark } from '#/utils/utils';

export const TABLE_STYLES = {
  '--cell-padding': '0',
  '--row-height': '36px',
  '--header-row-height': '36px',
};

export const TABLE_COLUMNS = [
  {
    code: 'stationName',
    name: '场站',
    width: 90,
    features: { autoRowSpan: true },
  },
  { code: 'attachmentName', name: '名称', width: 555 },
  { code: 'operation', name: '操作', width: 60 },
];

export const downFile = (fileUrl, fileName = '未命名') => {
  if (!fileUrl) return;
  let _a = document.createElement('a');
  _a.href = fileUrl;
  _a.download = fileName;
  document.body.appendChild(_a);
  var evt = document.createEvent('MouseEvents');
  evt.initEvent('click', false, false);
  _a.dispatchEvent(evt);
  document.body.removeChild(_a);
};

export const USER_DATA = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
